﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ZF.WS.UserControls;
using GCELibrary.Current;
using System.Transactions;
using ZF.BLL;
namespace ZF.WS.Admin.sys
{
    public class _uc : System.Web.UI.UserControl
    {
        public SiteInfo SiteInfo { get { return SiteInfo.Instance; } }
        public SystemConfig SystemConfig { get { return SiteInfo.SystemConfig; } }
        public virtual void InitControls() { }
   
        public virtual void Ok(object sender,EventArgs e)
        {
            SiteInfo.SystemConfig.Save();
            SiteInfo.WarnFactory.CreateWarn(new PageWarnParameter()
            {
                Link = WarnLink.Current,
                JscriptMode = true,
                Message = "操作成功",
            }).Alert();
        }
        public virtual void Finish()
        {
        }
    }
    public partial class jffg : _uc
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        public override void InitControls()
        {
            this.tbReg.Text = SystemConfig.JFReg.ToString();
            this.tbBFBaseJF.Text = SystemConfig.JFBFJF.BaseJF.ToString();
            this.tbBFBaseZC.Text = SystemConfig.JFBFJF.BaseZC.ToString();
            this.tbBFDZJF.Text = SystemConfig.JFBFJF.BFDZJF.ToString();
            this.tbBFDZZC.Text = SystemConfig.JFBFJF.BFDZZC.ToString();
            this.tbRecommend.Text = SystemConfig.JFRecommend.ToString();
            this.tbFSWTIntegral.Text = SystemConfig.FSWTIntegral.ToString();

       
        }
        public override void Ok(object sender, EventArgs e)
        {
            SystemConfig.JFReg = this.tbReg.Text.Convert<int>();
            SystemConfig.JFBFJF.BaseJF  = this.tbBFBaseJF.Text.Convert<int>();
            SystemConfig.JFBFJF.BaseZC  = this.tbBFBaseZC.Text.Convert<int>();
            SystemConfig.JFBFJF.BFDZJF  = this.tbBFDZJF.Text.Convert<int>();
            SystemConfig.JFBFJF.BFDZZC  = this.tbBFDZZC.Text.Convert<int>();
            SystemConfig.JFRecommend  = this.tbRecommend.Text.Convert<int>();
            SystemConfig.FSWTIntegral = this.tbFSWTIntegral.Text.Convert<int>();
            base.Ok(sender, e);
        }
    }
}